package com.kehutong.payfees.entity;

import com.kehutong.common.entity.DataEntity;
import com.kehutong.payfees.enums.ChargeModeType;
import com.kehutong.payfees.enums.ComputeType;
import com.kehutong.payfees.enums.PriceCycle;
import com.kehutong.payfees.enums.UnitPrice;
import org.coraframework.json.annotation.JSONField;
import org.coraframework.orm.annotation.Column;
import org.coraframework.orm.annotation.Table;
import org.coraframework.orm.annotation.UnSave;

import java.math.BigDecimal;
import java.util.List;

@Table(value = "t_charge_standard", comment="费项标准", multi = true)
public class ChargeStandard extends DataEntity {

    private static final long serialVersionUID = -1601119890723794287L;

    protected ChargeStandard(String id) {
        super(id);
    }

    @Column(comment = "收费科目ID")
    private String feeTypeId;

    @Column(comment = "小区编号")
    private String communityNo;

    @UnSave
    private String communityName;

    @Column(comment = "收费科目")
    private String feeTypeName;

    @Column(comment = "标准名称")
    private String name;

    @Column(comment = "价格周期")
    private PriceCycle priceCycle;

    @Column(comment = "计费方式")
    private ChargeModeType chargeMode;

    @Column(comment = "单位价格")
    private BigDecimal price;

    @Column(comment = "得数精度方式")
    private ComputeType computeType;

    @Column(comment = "得数精度单位")
    private UnitPrice unitPrice;

    @Column(dbType = "TEXT", comment="阶梯计费配置")
    private List<String> items;

    @JSONField(serialize = false)
    @Column(comment = "逻辑删除")
    private boolean deleted;

    @UnSave
    private List<ChargeStandardItem> standardItems;

    public String getFeeTypeId() {
        return feeTypeId;
    }

    public void setFeeTypeId(String feeTypeId) {
        this.feeTypeId = feeTypeId;
    }

    public String getFeeTypeName() {
        return feeTypeName;
    }

    public void setFeeTypeName(String feeTypeName) {
        this.feeTypeName = feeTypeName;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public PriceCycle getPriceCycle() {
        return priceCycle;
    }

    public void setPriceCycle(PriceCycle priceCycle) {
        this.priceCycle = priceCycle;
    }

    public ChargeModeType getChargeMode() {
        return chargeMode;
    }

    public void setChargeMode(ChargeModeType chargeMode) {
        this.chargeMode = chargeMode;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public ComputeType getComputeType() {
        return computeType;
    }

    public void setComputeType(ComputeType computeType) {
        this.computeType = computeType;
    }

    public UnitPrice getUnitPrice() {
        return unitPrice;
    }

    public void setUnitPrice(UnitPrice unitPrice) {
        this.unitPrice = unitPrice;
    }

    public List<String> getItems() {
        return items;
    }

    public void setItems(List<String> items) {
        this.items = items;
    }

    public List<ChargeStandardItem> getStandardItems() {
        return standardItems;
    }

    public void setStandardItems(List<ChargeStandardItem> standardItems) {
        this.standardItems = standardItems;
    }

    public boolean isDeleted() {
        return deleted;
    }

    public void setDeleted(boolean deleted) {
        this.deleted = deleted;
    }

    public String getCommunityNo() {
        return communityNo;
    }

    public void setCommunityNo(String communityNo) {
        this.communityNo = communityNo;
    }

    public String getCommunityName() {
        return communityName;
    }

    public void setCommunityName(String communityName) {
        this.communityName = communityName;
    }
}
